<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/10/7
  Time: 10:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>$Title$</title>
  <script type="text/javascript" src="static/js/jquery-3.4.1.js"></script>
      <script type="text/javascript">
        $(function () {
          $("input").click(function () {
              $.ajax({
                url:"user/user1",
                data:{},
                type:"post",
                dataType:"json",
                success:function (data) {
                  var str = "";
                  str += "<table>";
                  for (var i in data){
                    str += "<tr><td>"+data[i].id+"</td><td>"+data[i].username+"</td></tr>"
                  }
                  str += "</table>";

                  $("#userDate").html(str);
                }
              });

          });

        })
      </script>
</head>
<body>
<input type="button" value="查询" />
<hr/>
<div id="userDate">

</div>
</body>
</html>
